package cn.lg.soar.cms.biz.modules.other.entity;

import cn.lg.soar.core.annotations.constraints.group.Create;
import cn.lg.soar.core.annotations.constraints.group.Update;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDateTime;


/**
 * 收藏
 * @author luguoxiang
 * @since 2025-02-23
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Data
@Schema(description = "收藏")
@TableName("lg_cms_collect")
public class Collect {

    /** 业务id */
    @NotNull(message = "业务id不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "业务id")
    @Schema(description = "业务id")
    private Long bizId;

    /** 业务类型 */
    @NotNull(message = "业务类型不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "业务类型")
    @Schema(description = "业务类型")
    private Integer bizType;

    /**  */
    @NotNull(message = "主键不能为空", groups = { Update.class })
    @ExcelIgnore
    @Schema(description = "主键")
    @TableId
    private Long id;

    /** 收藏时间 */
    @NotNull(message = "收藏时间不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "收藏时间")
    @Schema(description = "收藏时间")
    private LocalDateTime time;

    /** 用户id */
    @NotNull(message = "用户id不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "用户id")
    @Schema(description = "用户id")
    private Long userId;

}
